<!DOCTYPE html>
<html lang="en-us">
<head><head>
    <meta name="google-site-verification" content="9vIieCe-Qpd78QOmBl63rGtIVbhY6sYyuxX3j8XWBA4" />
    <meta name="baidu-site-verification" content="LRrmH41lz7" />
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <meta name="description" content="马少勋，程序员, devops工程师 | 这里是 马少勋 的博客，与你一起发现更大的世界。">
    
    <meta name="keyword"  content=", , 马少勋的网络日志, 马少勋的博客, Mashaoxun Blog, 博客, 个人网站, 互联网, Web, 云原生, PaaS, Istio, Kubernetes, 微服务, Microservice">
    <link rel="shortcut icon" href="/blog/img/favicon.ico">

    <title>K8s-马少勋的博客 | MaShaoXun Blog</title>

    <link rel="canonical" href="/blog/blog/categories/k8s/">

    <link rel="stylesheet" href="/blog/css/iDisqus.min.css"/>
	
    
    <link rel="stylesheet" href="/blog/css/bootstrap.min.css">

    
    <link rel="stylesheet" href="/blog/css/hux-blog.min.css">

    
    <link rel="stylesheet" href="/blog/css/syntax.css">

    
    <link rel="stylesheet" href="/blog/css/zanshang.css">

    
    <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    
    
    <script src="/blog/js/jquery.min.js"></script>
    
    
    <script src="/blog/js/bootstrap.min.js"></script>
    
    
    <script src="/blog/js/hux-blog.min.js"></script>
	
    
    
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/styles/github.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/highlight.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/dockerfile.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/vim.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/yaml.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/go.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/bash.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/shell.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.13.1/languages/nginx.min.js"></script>
    <script>hljs.initHighlightingOnLoad();</script>
</head>
</head>

<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
    <div class="container-fluid">
        
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Mashaoxun Blog</a>
        </div>

        
        
        <div id="huxblog_navbar">
            <div class="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="/blog">Home</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/django">django</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/docker">docker</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/k8s">k8s</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/redis">redis</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/swarm">swarm</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/%E5%AD%98%E5%82%A8">存储</a>
                    </li>
                    
                    <li>
                        <a href="/blog/categories/%E7%9B%91%E6%8E%A7">监控</a>
                    </li>
                    
                    
		    
                        <li><a href="/blog/top/about/">ABOUT</a></li>
                    

                    
		    <li>
                        <a href="/blog/search">SEARCH <img src="/blog/img/search.png" height="15" style="cursor: pointer;"></a>
		    </li>
                    
                </ul>
            </div>
        </div>
        
    </div>
    
</nav>
<script>
    
    
    
    var $body   = document.body;
    var $toggle = document.querySelector('.navbar-toggle');
    var $navbar = document.querySelector('#huxblog_navbar');
    var $collapse = document.querySelector('.navbar-collapse');

    $toggle.addEventListener('click', handleMagic)
    function handleMagic(e){
        if ($navbar.className.indexOf('in') > 0) {
        
            $navbar.className = " ";
            
            setTimeout(function(){
                
                if($navbar.className.indexOf('in') < 0) {
                    $collapse.style.height = "0px"
                }
            },400)
        }else{
        
            $collapse.style.height = "auto"
            $navbar.className += " in";
        }
    }
</script>



<header class="intro-header" style="background-image: url('/blog/img/youyou.jpg')">
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 ">
                <div class="site-heading">
                    <h1>Mashaoxun Blog </h1>
                    
		    <span class="subheading">三十而立</span>
                </div>
            </div>
        </div>
    </div>
</header>



  
<div class="container">
    <div class="row">
        
        
   	    <div class="
            col-lg-8 col-lg-offset-1
            col-md-8 col-md-offset-1
            col-sm-12
            col-xs-12
            post-container
        ">
            

<div class="post-preview">
    <a href="https://masxhub.gitee.io/blog/post/2019-07-09-k8s-ns-and-svc-cmd/">
        <h2 class="post-title">
            python脚本批量执行k8s容器中的命令
        </h2>
	
        <div class="post-content-preview">
	
            批量执行k8s容器中的命令，namespace必选，service可选。
        
        </div>
    </a>
    <p class="post-meta">
    Posted by      &#34;马少勋&#34; Tuesday, July 9, 2019
    </p>
</div>
<hr>

<div class="post-preview">
    <a href="https://masxhub.gitee.io/blog/post/2019-03-20-k8s-master-cluster/">
        <h2 class="post-title">
            k8s多master部署
        </h2>
	
        <div class="post-content-preview">
	
            通过nginx&#43;keepalived实现k8s多master高可用集群
        
        </div>
    </a>
    <p class="post-meta">
    Posted by      &#34;马少勋&#34; Tuesday, March 12, 2019
    </p>
</div>
<hr>

<div class="post-preview">
    <a href="https://masxhub.gitee.io/blog/post/2019-03-12-k8s-yaml-create/">
        <h2 class="post-title">
            kubectl生成yaml文件以及查看pod的yaml
        </h2>
	
        <div class="post-content-preview">
	
            kubectl生成yaml文件以及查看pod的yaml
        
        </div>
    </a>
    <p class="post-meta">
    Posted by      &#34;马少勋&#34; Tuesday, March 12, 2019
    </p>
</div>
<hr>

<div class="post-preview">
    <a href="https://masxhub.gitee.io/blog/post/2019-03-12-k8s-kubeapi/">
        <h2 class="post-title">
            远程执行kubectl命令控制kubernetes集群
        </h2>
	
        <div class="post-content-preview">
	
            远程执行kubectl命令通过kube-apiserver控制kubernetes集群
        
        </div>
    </a>
    <p class="post-meta">
    Posted by      &#34;马少勋&#34; Tuesday, March 12, 2019
    </p>
</div>
<hr>


            



       	</div>
        

<div class="
    col-lg-3 col-lg-offset-0
    col-md-3 col-md-offset-0
    col-sm-12
    col-xs-12
    sidebar-container
">
    
    
    <section>
        <hr class="hidden-sm hidden-xs">
        <h5>FEATURED TAGS</h5>
        <div class="tags">
             
            
                
                    <a href="/blog/tags/ceph" title="ceph">
                        ceph
                    </a>
                
            
                
            
                
                    <a href="/blog/tags/docker" title="docker">
                        docker
                    </a>
                
            
                
                    <a href="/blog/tags/k8s" title="k8s">
                        k8s
                    </a>
                
            
                
            
                
            
                
            
                
                    <a href="/blog/tags/%E5%AD%98%E5%82%A8" title="存储">
                        存储
                    </a>
                
            
                
                    <a href="/blog/tags/%E7%9B%91%E6%8E%A7" title="监控">
                        监控
                    </a>
                
            
                
            
        </div>
    </section>
    

    
    <section class="visible-md visible-lg">
        <hr><h5><a href="">ABOUT ME</a></h5>
        <div class="short-about">
            
            <img src="/blog/img/touxiang.jpg" />
            
            
                <p>DevOps Developer, Reminiscence enthusiast</p>
            
           
           <ul class="list-inline"> 
               
               
               
               
               
               
               <li>
                   <a target="_blank" href="/blog/img/404.jpeg">
                       <span class="fa-stack fa-lg">
                           <i class="fa fa-circle fa-stack-2x"></i>
                           <i class="fa fa-wechat fa-stack-1x fa-inverse"></i>
                       </span>
                   </a>
               </li>
               
               
               <li>
                   <a target="_blank" href="https://github.com/yourgithub">
                       <span class="fa-stack fa-lg">
                           <i class="fa fa-circle fa-stack-2x"></i>
                           <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                       </span>
                   </a>
               </li>
               
               
               
                </ul>
            </div>
    </section>
    
    
    <section>
        <hr class="hidden-sm hidden-xs">
        <h5>FRIENDS</h5>
        <ul class="list-inline">
            
            <li><a target="_blank" href="http://www.zrq.org.cn">瑞卿博客</a></li>
            
        </ul>
    </section>
    

    
    
</div>

	</div>
</div>





<footer>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <ul class="list-inline text-center">
                   
                    
                    <li>
                        <a href="mailto:youremail@gmail.com">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-envelope fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
		    
                    
                    
                    
                    

                    

		    
                    
                    <li>
                        <a target="_blank" href="/blog/img/404.jpeg">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-wechat fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
		    
                    
                    <li>
                        <a target="_blank" href="https://github.com/yourgithub">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
		    
                    
                    
                </ul>
		<p class="copyright text-muted">
                    Copyright &copy; Mashaoxun Blog , 2019
                    <br>
                    <a href="https://themes.gohugo.io/hugo-theme-cleanwhite">CleanWhite Hugo Theme</a> by <a href="https://zhaohuabing.com">Huabing</a> |
                    <iframe
                        style="margin-left: 2px; margin-bottom:-5px;"
                        frameborder="0" scrolling="0" width="100px" height="20px"
                        src="https://ghbtns.com/github-btn.html?user=zhaohuabing&repo=hugo-theme-cleanwhite&type=star&count=true" >
                    </iframe>
                </p>
            </div>
        </div>
    </div>
</footer>




<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>






<script>
    
    if($('#tag_cloud').length !== 0){
        async("/js/jquery.tagcloud.js",function(){
            $.fn.tagcloud.defaults = {
                
                color: {start: '#bbbbee', end: '#0085a1'},
            };
            $('#tag_cloud a').tagcloud();
        })
    }
</script>


<script>
    async("https://cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.js", function(){
        var $nav = document.querySelector("nav");
        if($nav) FastClick.attach($nav);
    })
</script>


<script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https'){
       bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
      }
      else{
      bp.src = 'http://push.zhanzhang.baidu.com/push.js';
      }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>







</body>
</html>
